Repository navigation
[ISSUE #12833]✨Encode numeric message properties from stack buffers - #12844
Merged
Merged
Conversation
Collaborator
|
🔊@mxsm 🚀Thanks for your contribution🎉! |
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Issue(s) This PR Fixes(Closes)
Brief Description
Format integer properties with a stack-backed itoa buffer and construct the final CheetahString directly. Apply the helper to pull offsets, timer routing, batch counts and extended timeline fields.
How Did You Test This Change?
cargo test --locked -p rocketmq-model -p rocketmq-protocol --libpassed, including decimal display parity for signed and unsigned boundaries.cargo test --locked -p rocketmq-broker --lib hook_utilspassed.cargo test --locked -p rocketmq-store --features extended_timeline --test timer_extended_delivery_testspassed.Broker workload measurements
Compared the Broker at
391ed3e31with the combined runtime changes through this PR. Both variants used Rust 1.95.0, fat LTO, mimalloc, the same PGO input and separately trained BOLT layouts. Each scenario ran in fresh containers with the same client, NameServer and 1 KiB payload. Allocator runs used A, B, B, A order. Hardware runs repeated this sequence in reverse variant order for a total of four measurements per variant. The table reports means per completed message.Hardware counters cover user and kernel execution in Broker threads during the client-reported measurement window. Boundary counts are interpolated from samples at approximately 8 ms intervals. The LitePull window starts after seeding. Allocator counts came from separate runs tracing the mimalloc aligned allocation, zeroed allocation and reallocation entry points. All measured messages completed successfully. CPU cycles varied across paired runs, especially for synchronous sends.
Three of the four synchronous pairs used fewer cycles with the changes. One pair rose from 369k to 681k cycles and raised the arithmetic mean. In two additional synchronous pairs after local compilation finished, the means were 395,912 and 479,884 cycles per message (+21.2%). Both follow-up pairs were higher with the changes. The increase in both aggregate comparisons flags a synchronous-send cycle regression risk for this combined build.